package com.listener;

import java.util.ArrayList;
import java.util.List;

import com.yinhai.model.CMMeetingContact;

public class MeetingMemStatusMonitor {

	private List<MeetingMemStatusListener> mListeners = new ArrayList<MeetingMemStatusListener>();

	public void addMeetingMemStatusListener(MeetingMemStatusListener listener) {
		mListeners.add(listener);
	}

	public void removeMeetingMemStatusListener(MeetingMemStatusListener listener) {
		mListeners.remove(listener);
	}

	public void notice(List<CMMeetingContact> meeting_members) {

		int size = mListeners.size();
		for (int i = 0; i < size; i++) {
			MeetingMemStatusListener listener = mListeners.get(i);
			if (listener != null) {
				listener.MeetingMemStatus(meeting_members);
			}
		}
	}

	public void destory() {
		mListeners.clear();
		mListeners = null;
	}

	public static interface MeetingMemStatusListener {
		public void MeetingMemStatus(List<CMMeetingContact> meeting_members);
	}

}
